package com.project.class9_1.one.dao.impl;

import com.project.class9_1.one.bean.LogBean;
import com.project.class9_1.one.dao.ILogDao;

import java.sql.SQLException;

public class LogDaoImpl extends BaseDao implements ILogDao {
    @Override
    public void add(LogBean log) {
        this.setConnection();
        try {
            ps = con.prepareStatement("insert into t_log(l_content,l_date) values(?,?)");
            ps.setObject(1,log.getContent());
            ps.setObject(2,log.getLogDate());

            ps.executeUpdate();
        } catch (SQLException throwables) {
            throwables.printStackTrace();
        }finally{
            this.closeConnection();
        }
    }
}
